package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.LearnInfo;
import com.lh.service.LearnInfoService;
import com.lh.utils.Answer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/learnInfo")
public class LearnInfoController{

    @Autowired
    private LearnInfoService learnInfoService;

    @RequestMapping("/addLearnInfo")
    public Answer<Object> addLearnInfo(@RequestBody LearnInfo learnInfo) {
        return  learnInfoService.addLearnInfo(learnInfo);
    }

    @RequestMapping("/updateLearnInfo")
    public Answer<Object> updateLearnInfo(@RequestBody LearnInfo learnInfo) {
        return learnInfoService.updateLearnInfo(learnInfo);
    }

    @RequestMapping("/queryLearnInfoPage")
    public Answer<Object> queryLearnInfoPage(@RequestBody JSONObject reqJson) {
        return learnInfoService.queryLearnInfoPage(reqJson);
    }

    @RequestMapping("/queryLearnInfoList")
    public Answer<Object> queryLearnInfoList(@RequestBody JSONObject reqJson) {
        return learnInfoService.queryLearnInfoList(reqJson);
    }

    @RequestMapping("/queryLearnFilePage")
    public Answer<Object> queryLearnFilePage(@RequestBody JSONObject reqJson) {
        return learnInfoService.queryLearnFilePage(reqJson);
    }

    @RequestMapping("/queryLearnFileGroupPage")
    public Answer<Object> queryLearnFileGroupPage(@RequestBody JSONObject reqJson) {
        return learnInfoService.queryLearnFileGroupPage(reqJson);
    }
}